//
//  InvitationBaoJiaViewController.m
//  GLGW_Shoping
//
//  Created by yang on 2018/12/10.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "InvitationBaoJiaViewController.h"
#import "InvitationBaoJiaViewModel.h"
#import "InvitationBaoJiaSearchViewController.h"

@interface InvitationBaoJiaViewController ()<InvitationBaoJiaDelegate>{
    InvitationBaoJiaSearchViewController * baoJiaSearchVc;
}
@property(nonatomic,strong) InvitationBaoJiaViewModel * baoJiaViewModel;
@end

@implementation InvitationBaoJiaViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title =@"邀请报价";
    self.navigationController.navigationBar.barTintColor = [UIColor colorWithHexString:@"#F2F2F2"];
    self.baoJiaViewModel = [[InvitationBaoJiaViewModel alloc] initWithViewToViewModel:self.tableView theSuperView:self.view];
    self.baoJiaViewModel.delegate = self;
}

#pragma mark -- InvitationBaoJiaDelegate
-(void)showSearchView{
    baoJiaSearchVc = [InvitationBaoJiaSearchViewController new];
    self.definesPresentationContext = YES;
    baoJiaSearchVc.modalPresentationStyle = UIModalPresentationOverCurrentContext;
    [self presentViewController:baoJiaSearchVc animated:NO completion:nil];
}

-(void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
    [baoJiaSearchVc dismissViewControllerAnimated:NO completion:nil];
}
@end
